package com.zy.qudadid.presenter;

import com.zy.qudadid.presenter.base.BasePresenterImp;
import com.zy.qudadid.ui.view.CityPickerView;

/**
 * Created by ninos on 2016/8/20.
 */
public class CityPickerPresenter extends BasePresenterImp<CityPickerView> {

//    CityPickerActivity cityPickerActivity;
//
//    public CityPickerPresenter(){}
//    public CityPickerPresenter(CityPickerActivity cityPickerActivity){
//        this.cityPickerActivity = cityPickerActivity;
//    }
//
//    public void GetCityList(){
//        Subscription subscription = Net.getService()
//                .GetCityList("user","getcitylist")
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//                .subscribe(new Subscriber<Res<ArrayList<City>>>() {
//
//                    @Override
//                    public void onCompleted() {
//                    }
//
//                    @Override
//                    public void onError(Throwable e) {
//                        cityPickerActivity.error();
//                    }
//
//                    @Override
//                    public void onNext(Res<ArrayList<City>> res) {
//                        if (res.code== Const.OK){
//                            for (int i = 0; i<res.datas.size(); i++){
//                                res.datas.get(i).pinyin = StringUtil.getPingYin(res.datas.get(i).area_name);
//                            }
//                            cityPickerActivity.success(res.datas);
//                        }else {
//                            cityPickerActivity.error();
//                        }
//                    }
//                });
//
//        addSubscription(subscription);
//    }
}
